package com.party.core.model.photo;

import com.party.core.model.BaseModel;

/**
 * @Description: 图片相册
 * @Author: yangshoukun
 * @Date: 2018/5/29 17:40
 */
public class PhotosTag extends BaseModel {

    // 系统类型
    public final static Integer TYPE_SYSTEM = 0;
    // 自定义类型
    public final static Integer TYPE_CUSTOM = 1;

    // 精选
    public final static String ALBUM_CHOICENESS = "精选";
    // 热门
    public final static String ALBUM_HOT = "热门";
    // 时间线
    public final static String ALBUM_TIME_LINE = "时间线";

    private static final long serialVersionUID = -4847426044200325907L;

    // 相册项目id
    private String photosId;
    // 相册分类名称
    private String name;
    // 照片数量
    private Integer imgNum;
    // 分类类型(0: 系统, 1: 自定义)
    private Integer type;
    // 分类封面图
    private String pic;

    public String getPhotosId() {
        return photosId;
    }

    public void setPhotosId(String photosId) {
        this.photosId = photosId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getImgNum() {
        return imgNum;
    }

    public void setImgNum(Integer imgNum) {
        this.imgNum = imgNum;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof PhotosTag)) return false;
        if (!super.equals(o)) return false;

        PhotosTag that = (PhotosTag) o;

        if (photosId != null ? !photosId.equals(that.photosId) : that.photosId != null) return false;
        if (name != null ? !name.equals(that.name) : that.name != null) return false;
        if (imgNum != null ? !imgNum.equals(that.imgNum) : that.imgNum != null) return false;
        if (type != null ? !type.equals(that.type) : that.type != null) return false;
        return pic != null ? pic.equals(that.pic) : that.pic == null;
    }

    @Override
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + (photosId != null ? photosId.hashCode() : 0);
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (imgNum != null ? imgNum.hashCode() : 0);
        result = 31 * result + (type != null ? type.hashCode() : 0);
        result = 31 * result + (pic != null ? pic.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "PhotosTag{" +
                "photosId='" + photosId + '\'' +
                ", name='" + name + '\'' +
                ", imgNum=" + imgNum +
                ", type=" + type +
                ", pic='" + pic + '\'' +
                '}';
    }
}
